import ReactDOM from 'react-dom';
import React, { Component } from 'react';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reportWebVitals from './reportWebVitals';
import { HashRouter } from 'react-router-dom';
import { get, post, formPost } from './utils/http';
import App from './App';
import './index.css';
import reducers from './reducers'
Component.prototype.get = get;
Component.prototype.post = post;
Component.prototype.formPost = formPost;

const store = createStore(reducers)

ReactDOM.render(
  <Provider store={store}>
    <HashRouter>
      <App />
    </HashRouter >
  </Provider>,

  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
export default store;
